import React, { useState, useEffect } from 'react'
import ReactDOM from 'react-dom'

const App1 = () => {
    const [count, setCount] = useState(0)

    useEffect(() => {
        document.title = `You clickde ${count} times`;
    })
    return (
        <div>
            <h1>useState</h1>
            <p>You clicked {count} times</p>
            <button onClick={() => setCount(count + 1)}>
                Click me
            </button>
        </div>
    )
}

ReactDOM.render(<App1/>, document.getElementById('root'))